package com.authine.cloudpivot.ext.enums.system;

public enum ResourceTypeEnum {
    APP("0","应用"),
    MENU("1", "菜单"),
    TABS("2", "Tab页"),
    BUTTON("3", "按钮");

    private final String code;
    private final String des;

    ResourceTypeEnum(String code, String des) {
        this.code = code;
        this.des = des;
    }

    public static ResourceTypeEnum get(String code) {
        for (ResourceTypeEnum c : ResourceTypeEnum.values()) {
            if (c.code.equals(code)) {
                return c;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }


    @Override
    public String toString() {
        return "code:" + code + ", des:" + des;
    }
}
